﻿<!DOCTYPE html>
<html class="no-js">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>EasyQueue-Admin</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/custom.css">
<link rel="shortcut icon" href="/img/1367329744_17256.ico">
<script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="/_ah/channel/jsapi"></script>
<style type="text/css">
html,body {
	direction: rtl;
	height: 100%;
	background-image: url("img/diamond_upholstery.png");
	/* The html and body elements cannot have any padding or margin. */
}

.sizeElement {
	background-image: url("img/1378511262_z_File_Blank.png");
}

/* Wrapper for page content to push down footer */
#wrap {
	min-height: 100%;
	height: auto !important;
	height: 100%;
	/* Negative indent footer by it's height */
	margin: 0 auto -60px;
}

/* Set the fixed height of the footer here */
#push,#footer {
	height: 60px;
}

#footer {
	background-color: #f5f5f5;
}

/* Lastly, apply responsive CSS fixes as necessary */
@media ( max-width : 767px) {
	#footer {
		margin-left: -20px;
		margin-right: -20px;
		padding-left: 20px;
		padding-right: 20px;
	}
}
/* Custom page CSS
      -------------------------------------------------- */
/* Not required for template or sticky footer method. */
#wrap>.container {
	padding-top: 60px;
}

.container .credit {
	margin: 20px 0;
}

code {
	font-size: 80%;
}
</style>
</head>

<body>
	<!-------------- DESKTOP SITE -------------->
	<div id="wrap" class=visible-desktop>

		<!-- Fixed navbar -->
		<div class="navbar navbar-fixed-top navbar-inverse">
			<div class="navbar-inner">
				<div class="container">
					<h4 id=welcome class="muted pull-left">{{admin_name}}</h4>
					<!--/.nav-collapse -->
					<button type="button" class="btn btn-navbar" data-toggle="collapse"
						data-target=".nav-collapse">
						<span class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<div class="nav-collapse pull-right collapse">
						<ul class="nav">
							<li><a id=login href="{{ logout_url }}">התנתק</a></li>
							<li><a href="/help">עזרה</a></li>
							<li class="active"><a href="/admin_page">התורים שלי</a></li>
							<li><a href="/">ראשי</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div class="row-fluid container">

			<!-- Title -->
			<div class="row-fluid" align="center">
				<h1 style="font-size: 64px; line-height: 1">EasyQueue</h1>
				<p class="lead" style="direction: rtl;">הסוף לתורים כבר כאן!</p>
			</div>

			<!-- Left Side-->
			<div class="well offset1 span3" style="height: 700px;">
				<h4 align="center">הלקוחות שלי</h4>
				<div id=users_table align="center" style="margin-top: 10px;"></div>
				<div align="center" style="margin-top: 10px;">
					<a id=statisticBlockClick dir="rtl"></a>
				</div>
				<div id=statisticBlock style="border: double; margin-top: 10px;"
					align="center">
					<u>סטטיסטיקה</u>
					<p id=statistics></p>
				</div>

			</div>

			<!-- Middle -->
			<div class="well span4" style="height: 700px;">
				<h4 align="center">ניהול התור</h4>
				<div id=delete_message style="display: none; direction: rtl;"></div>
				<div id=queue_data style="display: none;">
					<div align="center">
						<div style="text-align: center">
							<h3 align=right style="direction: rtl;">שם התור:</h3>
							<h3 id=name>{{queue_name}}</h3>
						</div>

						<div>
							<h3 align=right id=inService style="direction: rtl;">משתמש
								נוכחי:</h3>
							<h3 id=served style="text-align: center; direction: rtl;">{{current_user}}</h3>
							<h3 align=right style="direction: rtl;">מספר טלפון:</h3>
							<h3 id=phone style="text-align: center; direction: rtl;">{{current_phone}}</h3>
							<br>

						</div>
					</div>

					<div style="text-align: center; margin-top: 10px;" align="center">
						<a href="javascript:call()" style="margin-bottom: 10px;" id=call>
							<img src="/img/button_next.png" width="65" height="65"
							align="center"></img>
						</a>
						<p>הבא בתור</p>
					</div>



					<div align="center" style="margin-top: 10px;">
						<a id=add href="javascript:add()" class="btn btn-large"
							data-toggle="tooltip" title="הוסף לתור"> <img
							src="/img/1378081875_add1-1.png" style="border-style: solid;"
							width="30" height="30"></img>
						</a> <a id=op href="javascript:operate()" class="btn btn-large"
							data-toggle="tooltip" title="{{queue_op}}"> <img
							src="/img/1378083281_519564-060_Off.png"
							style="border-style: solid;" width="30" height="30"></img>
						</a> <a id=set_number href="#extension" data-toggle="modal"
							class="btn btn-large" data-placement="right"
							data-toggle="tooltip" title="עדכן שלוחה"> <img
							src="/img/1378081564_Business_People_01.png"
							style="border-style: solid;" width="30" height="30"></img>
						</a> <a href="javascript:launch_manual()" class="btn btn-large"
							data-toggle="tooltip" title="צירוף לקוחות באמצעות עמדת שירות">
							<img src="/img/1377913502_Clipboard.png"
							style="border-style: solid;" width="30" height="30"></img>
						</a> <a href="javascript:print_qr()" class="btn btn-large"
							data-toggle="tooltip" title="צירוף לקוחות באמצעות דף הדפסה">
							<img src="/img/1377913405_printer.png"
							style="border-style: solid;" width="30" height="30"></img>
						</a> <a href="#image_modal" data-toggle="modal" class="btn btn-large"
							data-toggle="tooltip" title="תצוגה מקדימה של אתר הלקוחות"> <img
							src="/img/1378517363_xmag.png" style="border-style: solid;"
							width="30" height="30"></img>
						</a>
					</div>



				</div>
			</div>

			<!-- Right Side -->
			<div class="well span3" style="height: 700px;">
				<h4 align="center">התורים שלי</h4>
				<ul id=list class="nav nav-tabs nav-stacked"
					style="max-height: 6cm; postion: relative; cursor: pointer"></ul>
				<a class="btn offset3 span9" data-toggle="modal" href="#add_queue">תור
					חדש</a>
			</div>



		</div>

		<!-- Push -->
		<div id="push"></div>
	</div>

	<!-- Footer -->
	<div id="footer" class=visible-desktop
		style="background-color: #1b1b1b">
		<div class="container">
			<p align=center style="color: #999999">
				<br>© EasyQueue 2013
			</p>
		</div>
	</div>
	<!-- End Desktop -->


	<!-------------- MOBILE SITE -------------->
	<div class="container hidden-desktop" align="center">

		<div class="row-fluid" align="center">
			<h1>EasyQueue</h1>
		</div>
		<a class="btn" data-toggle="modal" href="#add_queue"
			data-toggle="tooltip" title="תור חדש"> <img
			src="/img/1378081449_Add.png" style="border-style: solid;" width="25"
			height="25"></img>
		</a>

		<div class="btn-group">
			<button class="btn dropdown-toggle btn-large" data-toggle="dropdown"
				id="current_queue_m">
				<span class="caret"></span>
			</button>
			<ul class="dropdown-menu" id=list_m></ul>
		</div>
		<div class="well" id=delete_message_m
			style="display: none; direction: rtl;"></div>
		<div class="span6 well"
			style="margin-top: 10px; margin-right: 5px; display: none;"
			align="center" id=queue_data_m>
			<a href="javascript:delete_queue('mobile')" class="btn"
				title="מחק תור" data-toggle="tooltip" style="float: left"> <img
				width="25" height="25" src="/img/1378081752_trash.png"></img>
			</a>

			<p class="lead" id=size_m style="text-align: right; direction: rtl;">אנשים
				בתור{{people_inline}}</p>
			<p class="lead" id=served_m
				style="text-align: right; direction: rtl;">משתמש נוכחי:
				{{current_user}}</p>
			<p class="lead" id=phone_m style="text-align: right; direction: rtl;">מספר
				טלפון: {{current_phone}}</p>

			<a href="javascript:call()" style="margin-bottom: 10px;" id=call_m>
				<img src="/img/button_next.png" width="50" height="50"
				align="center"></img>
			</a>
			<p>הבא בתור</p>

			<!---a class="btn btn-large btn-info" type="button" href="javascript:call()" id=call_m>
        הבא בתור <i class="icon-user icon-white"></i>
      </a!-->

			<div class="row-fluid">
				<div class="btn-group" id=otherOp_m>
					<a id=add_m href="javascript:add()" class="btn"
						data-toggle="tooltip" title="הוסף לתור"> <img
						src="/img/1378081875_add1-1.png" style="border-style: solid;"
						width="30" height="30"></img>
					</a> <a id=op_m href="javascript:operate()" class="btn"
						data-toggle="tooltip" title="{{queue_op}}"> <img
						src="/img/1378083281_519564-060_Off.png"
						style="border-style: solid;" width="30" height="30"></img>
					</a> <a id=set_number_m href="#extension" data-toggle="modal"
						class="btn" data-placement="right" data-toggle="tooltip"
						title="עדכן שלוחה"> <img
						src="/img/1378081564_Business_People_01.png"
						style="border-style: solid;" width="30" height="30"></img>
					</a> <a href="javascript:launch_manual()" class="btn"
						data-toggle="tooltip" title="צירוף לקוחות באמצעות עמדת שירות">
						<img src="/img/1377913502_Clipboard.png"
						style="border-style: solid;" width="30" height="30"></img>
					</a>
				</div>
			</div>


			<div align="center" style="margin-top: 10px;">
				<a id=statisticBlockClick_m href="javascript:show_stats()" dir="rtl">הצג
					סטטיסטיקה</a>
			</div>

			<div id=statisticBlock_m
				style="border: double; margin-top: 10px; display: none;"
				align="center">
				<u>סטטיסטיקה</u>
				<p id=statistics_m></p>
			</div>

		</div>



		<div class="footer" style="margin-top: 10px">
			<p>© EasyQueue 2013</p>
		</div>

	</div>
	<!-- End Mobile -->


	<!-------------- MODALS ------------->
	<!--OLD MODAL---

 <div id="add_queue" style="background-color: #E6E6FA;" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <form id="add_queue" action="add_queue">
      <div class="modal-header">
           <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h3 id="myModalLabel" style="text-align: right;">יצירת תור חדש</h3>
      </div>
      <div class="modal-body">
        <h4 style="text-align: right;">הכנס שם לתור החדש</h4>
                <input type="text" style="float:right; text-align: right;" name="queue_name" placeholder="שם התור">
               
         </div>
      <div class="modal-footer" style="background-color: #E6E6FA;">
        <button type="button" class="btn pull-left" data-dismiss="modal" aria-hidden="true">ביטול</button>
        <button type="submit" class="btn btn-primary pull-left">אישור</button>
      </div>
    </form>
  </div> -->

	<!--Add Queue Modal-->
	<div id="add_queue" style="background-color: #E6E6FA;"
		class="modal hide fade" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close pull-left" data-dismiss="modal"
				aria-hidden="true">&times;</button>
			<h3 id="myModalLabel" style="text-align: right;">יצירת תור חדש</h3>
			<h5 style="text-align: right; direction: rtl;">*ליצירה מהירה של
				תור הכנס שם ולחץ אישור</h5>
		</div>

		<form enctype="multipart/form-data" method=post id="add_queue"
			action="add_queue">
			<div class="modal-body">
				<div style="float: right;">
					<label style="text-align: right;">הכנס שם לתור החדש</label> <input
						required type="text" style="float: right; text-align: right;"
						name="queue_name" placeholder="שם התור" /><br> <label
						style="text-align: right;">בחר את סוג התור</label> <select
						name="queue_type" style="direction: rtl; float: right;">
						<option value="0" style="direction: rtl;">על בסיס שם</option>
						<option value="1" style="direction: rtl;">על בסיס ת.ז</option>
						<option value="2" style="direction: rtl;">אנונימי</option>
					</select> <label style="text-align: right; direction: rtl;">הכנס זמן
						טיפול משוער (בדקות)</label> <input type="text"
						style="float: right; text-align: right;" name="queue_time"
						placeholder="זמן טיפול משוער" /><br>
				</div>
			</div>

			<div class="modal-footer" style="background-color: #E6E6FA;">
				<button type="button" class="btn pull-left" data-dismiss="modal"
					aria-hidden="true">ביטול</button>
				<button type="submit" class="btn btn-primary pull-left">אישור</button>
			</div>
		</form>
	</div>


	<div id="alert" style="background-color: #FFFFFF;"
		class="modal hide fade" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class=" close pull-left" data-dismiss="modal"
				aria-hidden="true">
				<img src="/img/1367961525_27842.ico" height="15" width="15">
			</button>
			<h3 id="myAlert" style="text-align: right;">
				<img src="/img/1367961907_important.png" height="42" width="42"></img>
				שים לב
			</h3>
		</div>
		<div class="modal-body">
			<h4 id="alertMessage" style="text-align: right;">התור ריק ו/או
				אינו פעיל</h4>
		</div>
	</div>

	<!-- Add User Modal -->
	<div id="add_user" style="background-color: #E6E6FA;"
		class="modal hide fade" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<form id="user_data" target="">
			<div class="modal-header">
				<button type="button" class="close pull-left" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<h3 id="myModalLabel" style="direction: rtl;">
					הצטרפות לתור "
					<text id=add_user_header>{{queue_name}}</text>
					"
				</h3>
			</div>
			<div class="modal-body">
				<div style="float: right">
					<dt id=add_user_user_type style="text-align: right;">הכנס שם</dt>
					<input type="text" style="display: none;" name="queue_id" /> <input
						id=add_user_user_type_input type="text"
						style="float: right; text-align: right;" name="user_name"
						placeholder="שם פרטי ומשפחה" /><br>
					<dt style="text-align: right;">הכנס טלפון</dt>
					<input type="text" style="float: right; text-align: right;"
						name="user_phone" placeholder="מספר טלפון" />
				</div>
			</div>
			<div class="modal-footer" style="background-color: #E6E6FA;">
				<a type="button" class="btn pull-left" href="javascript:close_add()">ביטול</a>
				<button type="submit" class="btn btn-primary pull-left">אישור</button>
			</div>
		</form>
	</div>

	<!-- Extension Modal -->
	<div id="extension" style="background-color: #FFFFFF;"
		class="modal hide fade in" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class=" close pull-left" data-dismiss="modal"
				aria-hidden="true">
				<img src="/img/1367961525_27842.ico" height="15" width="15">
			</button>
			<h3 id="myAlert" style="text-align: right;">אנא הכנס מספר שלוחה</h3>

		</div>

		<div class="modal-body">
			<input type="text" style="float: right; text-align: right;"
				id=extension_num name="extention" placeholder="מספר שלוחה" />
		</div>

		<div class="modal-footer" style="background-color: #E6E6FA;">
			<button type="button" class="btn pull-left" data-dismiss="modal"
				aria-hidden="true">ביטול</button>
			<a href="#" class="btn btn-primary pull-left"
				onclick="update_extension();" data-dismiss="modal">אישור</a>
		</div>
	</div>

	<!-- Image Modal -->
	<div id="image_modal" class="modal hide fade" tabindex="-1"
		role="dialog" aria-labelledby="Queue Image" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close pull-left" data-dismiss="modal"
				aria-hidden="true">&times;</button>
			<h3 id="myModalLabel" style="direction: rtl;">תצוגה מקדימה של
				אתר הלקוחות</h3>
		</div>

		<p class="preview_text" align="right" dir="rtl">
			באפשרותך לשנות את עיצוב האתר הסלולרי של לקוחותיך. <br>בחר את
			התמונה עבור הרקע:
		</p>


		<form id="form1" method="POST" runat="server"
			enctype='multipart/form-data' action="/set_image">
			<div class="fileButtons">
				<input type='file' id="imgInp" name="imgInp" accept="image/*" /> <input
					type='button' id='remove' name="remove" value='הסר' />
			</div>
			<br>

			<div style="position: relative; left: 0px; top: 0pz;">
				<div align=center>
					<img src="img/iPhone.jpg"
						style="position: relative; top: 0px; left: 0px;" />
				</div>
			</div>
			<img id=background class="background" src="img/sample_background.jpg"
				style="position: absolute; top: 340px; left: 140px;" />


			<div class="modal-footer">
				<a type="button" class="btn pull-left" data-dismiss="modal">ביטול</a>
				<button type="submit" class="btn btn-primary pull-left">אישור</button>
			</div>
		</form>

	</div>
	<!-- End Modals -->

	<!-------------- JavaScripts -------------->
	<script
		src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
	<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
	<script src="js/vendor/bootstrap.min.js"></script>
	<script src="js/main.js"></script>
	<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
	<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
	<script src="js/vendor/bootstrap-modal.js"></script>
	<script src="js/vendor/bootstrap-alert.js"></script>




	<!-- SCRIPT DESCRIPTION -->
	<script>
                var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
                (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
                g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
                s.parentNode.insertBefore(g,s)}(document,'script'));
            </script>
	<script>$().alert();
		$("#new_alert").alert();</script>
	<script src="js/vendor/admin_page.js"></script>
	<script> 
	 	init("{{logout_url}}","{{admin_name}}","{{queue_type}}");
	</script>
</body>
</html>

